﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;

namespace ADiKt {
    class Human : Worm {
        public Keys left;
        public Keys right;

        public Human(Keys left, Keys right, Color colour) {
            this.left = left;
            this.right = right;
            this.colour = colour;
            this.colourName = Globals.colListFree[colour];
            Globals.colListUsed.Add(colour, colourName);
            Globals.colListFree.Remove(colour);
            Globals.worms.Add(this);
            reset();
        }

        public override void turn(KeyboardState ks) {
            if (ks.IsKeyDown(this.left)) {
                this.angle += Globals.turn_step;
            } else if (ks.IsKeyDown(this.right)) {
                this.angle -= Globals.turn_step;
            }
        }
    }
}
